shell_call_tianqi.sh
#!/bin/bash
TEMP=$(mysql-uUSERNAME-p'MysqlDatabasePassword'-hDatabaseIP-DDatabaseName-e"Msql查询语句");
#echo$TEMP;
curl'Webhook地址'\
-H'Content-Type:application/json'\
-d'{
"msgtype":"text",
"text":{
"content":"'"$TEMP"'"
}
}'
配置定时任务
crontab-e
308,17***cd/app/back